package com.comtop.topcloud.device.mapper;

import com.comtop.topcloud.device.model.mysql.StatisticsTable;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.Date;

/**
 * <p>
 * 统计数据表 Mapper 接口
 * </p>
 *
 * @author 张俊彬
 * @since 2025-01-04
 */
@Mapper
public interface StatisticsTableMapper extends BaseMapper<StatisticsTable> {

    StatisticsTable selectByDeviceIdAndTimeGranularityAndTimeStamp(String deviceId, String value, Date previousTime);

    StatisticsTable selectLastByDeviceIdAndTimeGranularity(String deviceId, String value);
}
